home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / dfpp01.zip / DESKTOP.H < prev    next >
C/C++ Source or Header  |  1992-11-21  |  2KB  |  52 lines

  1. // ---------- desktop.h
  2.  
  3. #ifndef DESKTOP_H
  4. #define DESKTOP_H
  5.  
  6. #include "screen.h"
  7. #include "cursor.h"
  8. #include "keyboard.h"
  9. #include "mouse.h"
  10. #include "speaker.h"
  11. #include "clock.h"
  12.  
  13. class DFWindow;
  14.  
  15. class DeskTop {
  16.     DFWindow *apwnd;        // application window
  17.     DFWindow *infocus;      // current window with the focus
  18.     DFWindow *firstcapture; // first window to capture the focus
  19.     DFWindow *focuscapture; // current window with captured focus
  20.     // ------- the desktop devices
  21.     Screen   sysscreen;     // the system screen
  22.     Mouse    sysmouse;      // the system mouse
  23.     Keyboard syskeyboard;   // the system keyboard
  24.     Cursor   syscursor;     // the system cursor
  25.     Clock    sysclock;      // the system clock
  26.     Speaker  sysspeaker;    // the system speaker
  27. public:
  28.     DeskTop();
  29.     ~DeskTop();
  30.     DFWindow *ApplWnd() { return apwnd; }
  31.     void SetApplication(DFWindow *ApWnd) { apwnd = ApWnd; }
  32.     Bool DispatchEvents();
  33.     DFWindow *InFocus()      { return infocus; }
  34.     DFWindow *FocusCapture() { return focuscapture; }
  35.     DFWindow *FirstCapture() { return firstcapture; }
  36.     void SetFocus(DFWindow *wnd) { infocus = wnd; }
  37.     void SetFocusCapture(DFWindow *wnd) { focuscapture = wnd; }
  38.     void SetFirstCapture(DFWindow *wnd) { firstcapture = wnd; }
  39.     // ------- the desktop devices
  40.     Mouse&    mouse()       { return sysmouse;    }
  41.     Screen&   screen()      { return sysscreen;   }
  42.     Keyboard& keyboard()    { return syskeyboard; }
  43.     Cursor&   cursor()      { return syscursor;   }
  44.     Clock&    clock()       { return sysclock;    }
  45.     Speaker&  speaker()     { return sysspeaker;  }
  46. };
  47.  
  48. extern DeskTop desktop;
  49.  
  50. #endif
  51.  
  52.